package cc.mrbird.febs.wc.dao;

import cc.mrbird.febs.wc.domain.WeiboBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface WeiboMapper {

    /**
     * 查询相应类型关键词及词频
     * @param type
     * @return
     */
    @Select("SELECT * FROM weibo_wc where w_keyword = #{type}")
    List<WeiboBean> listWeiBo(@Param("type") String type);

    /**
     * 查询关键词类型
     * @return
     */
    @Select("SELECT w_keyword FROM weibo_wc group by w_keyword")
    List<String> listType();
}
